Semiconductor wafers, such as silicon wafers, often contain dopants. These dopants, such as boron and phosphorus, may contaminate the wafer. For example, if boron and phosphorus are present in the active device region of the wafer, unacceptable resistivity shifts may occur. Annealing can cause boron and phosphorus to be driven into the active device region in the top layer of the wafer. For purposes of this disclosure, the top layer of the wafer is the top 10 microns of the wafer. In some cases, the resistivity shift may even cause the wafer to shift from a P-type to an N-type wafer. Prior art solutions to this problem do not reliably or satisfactorily remove both boron and phosphorus contamination from the wafer.